#region

using Microsoft.OpenApi.Models;

#endregion

namespace Leo.Core.Swagger
{
    public class OpenApiInfoEx : OpenApiInfo
    {
        /// <summary>
        ///     分组私有字段
        /// </summary>
        private string _group;

        /// <summary>
        ///     构造函数
        /// </summary>
        public OpenApiInfoEx()
        {
            Version = "1.0.0";
        }

        /// <summary>
        ///     所属组
        /// </summary>
        public string Group
        {
            get => _group;
            set
            {
                _group = value;
                Title ??= string.Join(' ', _group);
            }
        }

        /// <summary>
        ///     排序
        /// </summary>
        public int? Order { get; set; }

        /// <summary>
        ///     是否可见
        /// </summary>
        public bool? Visible { get; set; }
    }
}